package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 脱水历程枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022-11-09
 */
@AllArgsConstructor
@Getter
public enum DehydrationEnum {

    WAIT_DEHYDRATION(0, "待脱水"),
    IN_DEHYDRATION(1, "脱水中"),;

    private Integer code;
    private String desc;

    public static DehydrationEnum getByCode(Integer code) {
        DehydrationEnum[] dehydrationEnums = DehydrationEnum.values();
        for (DehydrationEnum anEnum : dehydrationEnums) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
